home *** CD-ROM | disk | FTP | other *** search
/ Programming in Microsoft Windows with C# / Programacion en Microsoft Windows con C#.iso / Original Code / Essential Structures / HuckleberryFinn / HuckleberryFinn.cs next >
Encoding:
Text File  |  2001-01-15  |  1.6 KB  |  41 lines

  1. //----------------------------------------------
  2. // HuckleberryFinn.cs ⌐ 2001 by Charles Petzold
  3. //----------------------------------------------
  4. using System;
  5. using System.Drawing;
  6. using System.Windows.Forms;
  7.  
  8. class HuckleberryFinn: Form
  9. {
  10.      public static void Main() 
  11.      {
  12.           Application.Run(new HuckleberryFinn()); 
  13.      }
  14.      public HuckleberryFinn()
  15.      {
  16.           Text = "\"The Adventures of Huckleberry Finn\"";
  17.           BackColor = SystemColors.Window;
  18.           ForeColor = SystemColors.WindowText;
  19.           ResizeRedraw = true;
  20.      }
  21.      protected override void OnPaint(PaintEventArgs pea)
  22.      {
  23.           pea.Graphics.DrawString(     
  24.                "You don't know about me, without you " +
  25.                "have read a book by the name of \"The " +
  26.                "Adventures of Tom Sawyer,\" but that " +
  27.                "ain't no matter. That book was made by " +
  28.                "Mr. Mark Twain, and he told the truth, " +
  29.                "mainly. There was things which he " +
  30.                "stretched, but mainly he told the truth. " +
  31.                "That is nothing. I never seen anybody " +
  32.                "but lied, one time or another, without " +
  33.                "it was Aunt Polly, or the widow, or " +
  34.                "maybe Mary. Aunt Polly\x2014Tom's Aunt " +
  35.                "Polly, she is\x2014and Mary, and the Widow " +
  36.                "Douglas, is all told about in that book" +
  37.                "\x2014which is mostly a true book; with " +
  38.                "some stretchers, as I said before.", 
  39.                Font, new SolidBrush(ForeColor), ClientRectangle);
  40.      }
  41. }